<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%> 
<%@page import="java.io.InputStream"%>
<%@page import="org.apache.ibatis.io.Resources"%>
<%@page import="org.apache.ibatis.session.SqlSessionFactory"%>
<%@page import="org.apache.ibatis.session.SqlSession"%>
<%@page import="java.io.IOException"%>
<%@page import="org.apache.ibatis.session.SqlSessionFactoryBuilder"%>
<%@page import="util.Info"%>
<%@page import="dao.CommDAO"%>
<%@page import="util.PageManager"%>
 
<!DOCTYPE html>
<!--[if lt IE 7 ]><html class="ie ie6" lang="en"> <![endif]-->
<!--[if IE 7 ]><html class="ie ie7" lang="en"> <![endif]-->
<!--[if IE 8 ]><html class="ie ie8" lang="en"> <![endif]-->
<!--[if (gte IE 9)|!(IE)]><!--><html lang="en"> <!--<![endif]-->

<head>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="description" content="桌面壁纸网站 - Clean HTML5 and CSS3 responsive template">
<meta name="author" content="MyPassion">

<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">

<title>桌面壁纸网站 - Responsive HTML5 and CSS3 </title>

<link rel="shortcut icon" href="img/sms-4.ico" />

<!-- STYLES -->
<link rel="stylesheet" type="text/css" href="/wallpaper/frontfiles/css/superfish.css" media="screen"/>
<link rel="stylesheet" type="text/css" href="/wallpaper/frontfiles/css/fontello/fontello.css" />
<link rel="stylesheet" type="text/css" href="/wallpaper/frontfiles/css/flexslider.css" media="screen" />
<link rel="stylesheet" type="text/css" href="/wallpaper/frontfiles/css/ui.css" />
<link rel="stylesheet" type="text/css" href="/wallpaper/frontfiles/css/base.css" />
<link rel="stylesheet" type="text/css" href="/wallpaper/frontfiles/css/style.css" />
<link rel="stylesheet" type="text/css" href="/wallpaper/frontfiles/css/960.css" />
<link rel="stylesheet" type="text/css" href="/wallpaper/frontfiles/css/devices/1000.css" media="only screen and (min-width: 768px) and (max-width: 1000px)" />
<link rel="stylesheet" type="text/css" href="/wallpaper/frontfiles/css/devices/767.css" media="only screen and (min-width: 480px) and (max-width: 767px)" />
<link rel="stylesheet" type="text/css" href="/wallpaper/frontfiles/css/devices/479.css" media="only screen and (min-width: 200px) and (max-width: 479px)" />
 
<!--[if lt IE 9]> <script type="text/javascript" src="/wallpaper/frontfiles/js/customM.js"></script> <![endif]-->


</head>

<body>

<!-- Body Wrapper -->
<div class="body-wrapper">
	<div class="controller">
    <div class="controller2">

        <jsp:include page="top.jsp"></jsp:include>
        
        <!-- Content -->
        <section id="content">
            <div class="container">
           
           <%
String type = request.getParameter("type")==null?"1":request.getParameter("type");
String typename = "";
String key = request.getParameter("key")==null?"":request.getParameter("key");
if(type.equals("1"))typename = "自然风光";
if(type.equals("2"))typename = "社会人文";
if(type.equals("3"))typename = "艺术作品";
if(type.equals("4"))typename = "科技科幻";
String sql = "select * from resources where stype='"+typename+"' " ;
 if(!key.equals(""))
 {
    sql+=" and (title like'%"+key+"%') ";
 }
  sql +=" order by id desc ";
            %> 	 
            
            	<!-- Main Content -->
                <div class="main-content">
                    
                    <!-- Single -->
                    <div class="column-two-third single">
                    	 
                        <div class="relatednews">
                            <h5 class="line"><span><%=typename %>.</span></h5>
                            <ul>
                                
                                
<%   
String url = "sysusercx.jsp?1=1&type="+type+""; 
ArrayList<HashMap> list = PageManager.getPages(url,12, sql, request ); 
for(HashMap map:list){ 
 String stars = map.get("stars").toString();
%>
   <li>
       <a href="resourcex.jsp?id=<%=map.get("id") %>"><img src="/wallpaper/upfile/<%=map.get("filename") %>" alt="MyPassion"  width="290" height="210" /></a>
       <p>
           <span>发布人 : <%=map.get("uname") %> &nbsp;-&nbsp; <%=map.get("savetime") %> </span>
           <a href="resourcex.jsp?id=<%=map.get("id") %>"><%=Info.ensubStr(map.get("title"),20)  %></a>
            
           
       </p>
       <span class="rating"><span style="width:90%;">  
          <%
       if(!stars.equals("")){
        %>
       <img style="display: inline" src="/wallpaper/frontfiles/img/star<%=stars %>.png" alt="MyPassion"  width="60" height="13" />
       <%} %>
       </span></span>
   </li>
 <%} %>  
                                
                                
                            </ul>
                        </div>
                         
                        
                    </div>
                    <!-- /Single -->
                    
                </div>
                <!-- /Main Content -->
                  
            </div>    
        </section>
        <!-- / Content -->
        
        <center>
        &nbsp;
        <div >
        ${page.info}
        </div>
        &nbsp;
        </center>
        <jsp:include page="foot.jsp"></jsp:include>
        
        
         
    
    </div>
	</div>
</div>
<!-- / Body Wrapper -->


<!-- SCRIPTS -->
<script type="text/javascript" src="/wallpaper/frontfiles/js/jquery.js"></script>
<script type="text/javascript" src="/wallpaper/frontfiles/js/easing.min.js"></script>
<script type="text/javascript" src="/wallpaper/frontfiles/js/1.8.2.min.js"></script>
<script type="text/javascript" src="/wallpaper/frontfiles/js/ui.js"></script>
<script type="text/javascript" src="/wallpaper/frontfiles/js/carouFredSel.js"></script>
<script type="text/javascript" src="/wallpaper/frontfiles/js/superfish.js"></script>
<script type="text/javascript" src="/wallpaper/frontfiles/js/customM.js"></script>
<script type="text/javascript" src="/wallpaper/frontfiles/js/flexslider-min.js"></script>
<script type="text/javascript" src="/wallpaper/frontfiles/js/tweetable.js"></script>
<script type="text/javascript" src="/wallpaper/frontfiles/js/timeago.js"></script>
<script type="text/javascript" src="/wallpaper/frontfiles/js/jflickrfeed.min.js"></script>
<script type="text/javascript" src="/wallpaper/frontfiles/js/mobilemenu.js"></script>

<!--[if lt IE 9]> <script type="text/javascript" src="/wallpaper/frontfiles/js/html5.js"></script> <![endif]-->
<script type="text/javascript" src="/wallpaper/frontfiles/js/mypassion.js"></script>


</body>
</html>

 
            